﻿<UserControl x:Class="Might.GraphicsEditor.IconEditor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    KeyDown="DrawCanvas_KeyDown" >
    
    <Grid x:Name="topGrid" Background="#FF2F2F2F">
    	<Grid.RowDefinitions>
    		<RowDefinition Height="20"/>
    		<RowDefinition Height="*"/>
    		<RowDefinition Height="20"/>
    	</Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
            <Button Content="Select" x:Name="Select" Click="Select_Click"/>
    		<Button Content="Rectangle" x:Name="Rectangle" Click="Rectangle_Click"/>
    		<Button Content="Ellipse" x:Name="Ellipse" Click="Ellipse_Click"/>
            <Button Content="Delete" x:Name="Delete" Click="Delete_Click"/>
            <Button Content="Up" x:Name="Up" Click="Up_Click"/>
    		<Button Content="Down" x:Name="Down" Click="Down_Click"/>
            <Button Content="Top" x:Name="Top" Click="Top_Click"/>
            <Button Content="Bottom" x:Name="Bottom" Click="Bottom_Click"/>
        </StackPanel>
        <Slider x:Name="ZoomSlider" HorizontalAlignment="Left" Orientation="Horizontal" ToolTipService.ToolTip="Zoom 0.5x - 2x"
                Maximum="2" Minimum="0.5" LargeChange="0.1" SmallChange="0.05" Value="1" Cursor="Hand" Width="200"
                ValueChanged="Slider_ValueChanged" Margin="0,-3,0,0" Grid.Row="2" />
    	
        <ScrollViewer x:Name="Scroller"  Grid.Row="1"  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Padding="0,0,0,0">
            <ScrollViewer.Clip>
                <RectangleGeometry x:Name="clipGeometry" />
            </ScrollViewer.Clip>
            <Grid x:Name="ContentViewer"
                MouseLeftButtonDown="DrawCanvas_MouseLeftButtonDown" MouseMove="DrawCanvas_MouseMove"
                MouseLeftButtonUp="DrawCanvas_MouseLeftButtonUp" RenderTransformOrigin="0.5,0.5" Background="#00000000" Width="600" Height="600">
                <Grid.RenderTransform>
					<ScaleTransform x:Name="ContentScale"/>
				</Grid.RenderTransform>
    			<Border Height="200" Width="200" BorderBrush="#FF000000" BorderThickness="1,1,1,1"/>
    			<Canvas x:Name="adorner" Background="Transparent" Width="200" Height="200"/>
    		</Grid>
    	</ScrollViewer>
    </Grid>
</UserControl>
